<?php
	header("Content-Type: text/html;charset=utf-8");
	include("../_judge.php");
	include("../../function/function.php");
	
	$action = chkstr(trim($_REQUEST['action']));
	$now_time = date("Y-m-d H:i:s");
	$re_url = trim($_REQUEST['re_url']);
	$newsid = $_REQUEST['newsid'];
	$news_option = chkstr(trim($_REQUEST['news_option']));
	$id = trim($_REQUEST['id']);
	
	
	if(is_array($newsid)){ // 拆分数组
		$newsid = implode(',',$newsid);
	}
	
	
	if($action == "del"){
		if($news_option == "del"){
			if(!empty($newsid)){
				// 删除数据
				$mysql = new sqlstr("kboy_active_message"); 
				$news_sql = $mysql -> deleteSql("id in($newsid)");
				$news_res = mysql_query($news_sql);
				if($news_res){
					echo ok("操作成功",$_SERVER['HTTP_REFERER']);
				}else{
					echo erro("服务器内部错误");
				}
			}else{
				echo erro("至少选择一条记录进行操作");
			}
		}else{
			erro("请选择要操作的方式");
		}
	
	}else{
		echo erro("参数错误");
	}
	
?>
